<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('表单元素字典列表')"/>
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<input id="id"   name="id"    type="hidden" value="0" />
					<input id="name" name="name"  type="hidden" value="" />
					<input id="dictDataSet" name="dictDataSet"  type="hidden" th:value="${dictDataSet}" />
					<div class="select-list">
						<ul>
							<li>
								<p>字典代码：</p>
								<input type="text" name="dictCode"/>
							</li>
							<li>
								<p>字典描述：</p>
								<input type="text" name="dictTitle"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
										class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
										class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>


<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "form/dict";

    $(function () {

        var options = {
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            url: prefix + "/list",
            modalName: "表单元素字典",
            onClickRow:function(row,$element){
                $("#id").val(row.dictId);
                $("#name").val(row.dictCode+"->"+row.dictTitle);
			},
            columns: [{
                radio: true
            },
                {
                    field: 'dictId',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'dictCode',
                    title: '字典代码'
                },
                {
                    field: 'dictTitle',
                    title: '字典描述'
                },
                {
                    field: 'dictType',
                    title: '字典类型',
                    visible: false
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>